export default async (that)=>{
	return {
		columns:[
			{
				key:"refundNo",
				label:"退款号"
			},
			{
				key:"payNo",
				label:"支付订单号"
			},
			{
				key:"price",
				label:"退款金额"
			},
			{
				key:"remark",
				label:"备注",
				slot:"remark"
			},
			{
				key:"reason",
				label:"退款原因"
			},
			{
				key:"status",
				label:"退款状态",
				slot:"status"
			},
			{
				key:"successTime",
				label:"退款时间",
				slot:"successTime"
			},
			// {
			// 	key:"operation",
			// 	label:"操作",
			// 	slot:"operation",
			// 	width:250,
			// 	props:{
			// 		fixed:"right"
			// 	},
			// 	removeBtn:{
			// 		show:true,
			// 		permission:""
			// 	},
			// 	editBtn:{
			// 		show:true,
			// 		permission:""
			// 	},

			// }
		],
		reqOptions:{
			list:{
				method:"get",
				url:"/pay/wxRefund",
			},
			insert:{
				method:"post",
				url:"/pay/wxRefund"
			},
			update:{
				method:"put",
				url:"/pay/wxRefund"
			},
			remove:{
				method:"delete",
				url:"/pay/wxRefund/${id}"
			}
		},
		search:{
			form:{},
			attrs:{
				gutter:20,
			},
			options:[
				{
					key:"refundNo",
					type:"el-input",
					label:"退款号",
					span:6,
					props:{
						clearable:true
					}

				},
				{
					key:"payNo",
					type:"el-input",
					label:"支付订单号",
					span:6,
					props:{
						clearable:true
					}

				},
				{
					key:"status",
					type:"el-select",
					label:"退款状态",
					span:6,
					options:[
						{
							label:"退款中",
							value:0
						},
						{
							label:"已退款",
							value:1
						},
						{
							label:"退款异常",
							value:2
						},
						{
							label:"退款关闭",
							value:3
						},
					],
					props:{
						clearable:true
					}

				},
				{
					key:"test",
					type:"el-button",
					label:"查询",
					span:6,
					// label:"  ",
					removeLabel:true,
					width:false,
					props:{
						type:"primary"
					},
					listeners:{
						click(...e){
							that.searchFun && that.searchFun instanceof Function && that.searchFun(...e)
							that.$emit("search")
							console.log("click")
							that.getList()
						}
					}
				},
			],
			direction:"h",
			labelPosition:"right"
		},
		operation:{
			form:{},
			// options:[
			// 	{
			// 		key:"btn1",
			// 		type:"el-button",
			// 		label:"添加",
			// 		width:false,
			// 		removeLabel:true,
			// 		props:{
			// 			type:"primary",
			// 			icon:"el-icon-plus"
			// 		},
			// 		listeners:{
			// 			click:(...e)=>{
			// 				console.log(that)
			// 				that.addFun && that.addFun instanceof Function && that.addFun(...e)
			// 			}
			// 		}
			// 	},
			// ],
			direction:"h"
		},
		updateField:async (form={})=>{
			return {
				form,
				direction:"h",
				options:[
					{
						key:"refundNo",
						type:"el-input",
						label:"退款id",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"payNo",
						type:"el-input",
						label:"支付id",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"price",
						type:"el-input",
						label:"退款金额",
						span:8,
						props:{
							clearable:true,
						},
						other:"BigDecimal",
						required:true
					},
					{
						key:"status",
						type:"el-input",
						label:"0为退款，1已退款",
						span:8,
						props:{
							clearable:true,
							type:"number",
						},
						other:"Integer",
						required:true
					},
				]
			}
		},
		config:{
			table:{
				checkbox:false
			}
		}
	}
}